#!/bin/bash -ev
###
 # @Author: WangYu
 # @Date: 2023-03-16 09:21:59
 # @LastEditors: WangYu
 # @LastEditTime: 2023-08-09 11:26:19
 # @FilePath: /docker-telemac/docker/checkout.sh
 # @Description: 
 # @copyright: Copyright (c) 2023 by WangYu, All Rights Reserved. 
### 

echo "Checking out TELEMAC-MASCARET source..."

source ${TELEMAC_ROOT}/setenv.sh

mkdir ${HOMETEL}
ln -s ${HOMETEL} ${TELEMAC_ROOT}/latest

# if [[ $TELEMAC_MASCARET_VER == "trunk"  ]]; then
#     TELEMAC_SVN_PATH="http://svn.opentelemac.org/svn/opentelemac/trunk"
# else
#     TELEMAC_SVN_PATH="http://svn.opentelemac.org/svn/opentelemac/tags/${TELEMAC_MASCARET_VER}"
# fi

# svn co ${TELEMAC_SVN_PATH} ${HOMETEL} \
#     --username ot-svn-public --password 'telemac1*' --no-auth-cache
cd ${HOMETEL}
git clone --branch v8p3r0 --single-branch https://gitlab.pam-retd.fr/otm/telemac-mascaret.git .
echo "Finished $0"